package com.heima.model.comment.dtos;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
@NotNull(message = "CommentRepayDTO 不能为空")
public class CommentRepayDTO {
    /**
     * 评论id
     */
    @NotNull(message = "commentId 不能为空")
    private String commentId;
    private Integer size;
    // 最小时间
    private Date minDate;
    public void check(){
        if (this.size == null || this.size == 0){
            this.size = 10;
        }
        if (this.minDate == null){
            this.minDate = new Date();
        }
    }
}